$(function() {
    $("form").submit(function() {
        //user, pwd, sex, phone

        var oUser = {
            user: $('[name="uname"]').val(),
            pwd: $('[name="upwd"]').val(),
            sex: $('[name="usex"]:checked').val(),
            phone: $('[name="uphone"]').val()
        }

        $.ajax({
            url: "/account/reg",
            type: 'post',
            data: oUser
        }).done(function(res) {
            console.log(res);
        })
        return false;

    })
})